/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package isd.facturacion.vista;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.IdClass;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 *
 * @author Claudio
 */
@Entity
@Table(name = "pdpeng")
@IdClass(FC_MovimientoPendientePK.class)
public class FC_MovimientoPendiente implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Column(name = "PDRMVI_MODAPL", length = 2)
    private String modapl;
    @Id
    @Column(name = "PDRMVI_CODAPL", length = 6)
    private String codapl;
    @Id
    @Column(name = "PDRMVI_NROAPL")
    private Integer nroapl;
    @Id
    @Column(name = "PDRMVH_CIRCOM", length = 6)
    private String circom;

    @Column(name = "PDRMVI_TIPORI", length = 2)
    private String tipori;
    
    @Column(name = "PDRMVI_FORMUL", length = 6 )
    private String formula;


    @Column(name = "PDRMVH_FCHMOV")
    @Temporal(TemporalType.DATE)
    private Date fchmov;
    @Basic(optional = false)
    @Column(name = "CANTIDAD_ITEMS", nullable = false)
    private long count;
    @Column(name = "GRCCBH_DESCRP", length = 60)
    private String modcom;

//    @OneToMany(cascade = CascadeType.ALL, mappedBy = "movimiento", fetch=FetchType.LAZY)
//    private List<PD_ItemPendiente> itemsPendiente;

    public FC_MovimientoPendiente() {

    }

    public String getCircom() {
        return circom;
    }

    public void setCircom(String circom) {
        this.circom = circom;
    }

    public String getCodapl() {
        return codapl;
    }

    public void setCodapl(String codapl) {
        this.codapl = codapl;
    }

    public long getCount() {
        return count;
    }

    public void setCount(long count) {
        this.count = count;
    }

    public Date getFchmov() {
        return fchmov;
    }

    public void setFchmov(Date fchmov) {
        this.fchmov = fchmov;
    }

    public String getModapl() {
        return modapl;
    }

    public void setModapl(String modapl) {
        this.modapl = modapl;
    }

    public String getModcom() {
        return modcom;
    }

    public void setModcom(String modcom) {
        this.modcom = modcom;
    }

    public Integer getNroapl() {
        return nroapl;
    }

    public void setNroapl(Integer nroapl) {
        this.nroapl = nroapl;
    }

    public String getTipori() {
        return tipori;
    }

    public void setTipori(String tipori) {
        this.tipori = tipori;
    }

    public String getFormula() {
        return formula;
    }

    public void setFormula(String formula) {
        this.formula = formula;
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final FC_MovimientoPendiente other = (FC_MovimientoPendiente) obj;
        if ((this.modapl == null) ? (other.modapl != null) : !this.modapl.equals(other.modapl)) {
            return false;
        }
        if ((this.codapl == null) ? (other.codapl != null) : !this.codapl.equals(other.codapl)) {
            return false;
        }
        if (this.nroapl != other.nroapl && (this.nroapl == null || !this.nroapl.equals(other.nroapl))) {
            return false;
        }
        if ((this.circom == null) ? (other.circom != null) : !this.circom.equals(other.circom)) {
            return false;
        }
        if (this.fchmov != other.fchmov && (this.fchmov == null || !this.fchmov.equals(other.fchmov))) {
            return false;
        }
        if (this.count != other.count) {
            return false;
        }
        if ((this.modcom == null) ? (other.modcom != null) : !this.modcom.equals(other.modcom)) {
            return false;
        }
        return true;
    }

    @Override
    public int hashCode() {
        int hash = 5;
        hash = 47 * hash + (this.modapl != null ? this.modapl.hashCode() : 0);
        hash = 47 * hash + (this.codapl != null ? this.codapl.hashCode() : 0);
        hash = 47 * hash + (this.nroapl != null ? this.nroapl.hashCode() : 0);
        hash = 47 * hash + (this.circom != null ? this.circom.hashCode() : 0);
        hash = 47 * hash + (this.fchmov != null ? this.fchmov.hashCode() : 0);
        hash = 47 * hash + (int) (this.count ^ (this.count >>> 32));
        hash = 47 * hash + (this.modcom != null ? this.modcom.hashCode() : 0);
        return hash;
    }

    @Override
    public String toString() {
        return "PD_MovimientoPendiente{" + "modapl=" + modapl + "codapl=" + codapl + "nroapl=" + nroapl + "circom=" + circom + "fchmov=" + fchmov + "count=" + count + "modcom=" + modcom + '}';
    }

    

}
